package entity_controllers.fieldcontrollers;

import boundary.UI;
import ie.FieldBoard;
import ie.PlayerBoard;
import ie.Shaker;
import controllers.FieldController;
import core.subcontrollers.PlayerController;
import dto.Field;
import dto.Player;
import entity.fields.Jail;

public class JailController extends FieldController {

	@Override
	public void execute(Player player, Field field, FieldBoard fieldBoard, PlayerBoard playerBoard, Shaker shaker) {
				
		// Player lands on the moveToJail field
		if (((Jail) field).isSendsToJail()) {
			UI.get().getMessage("De fængsles");
			PlayerController.setInJail(player, fieldBoard);
		}
		else
			UI.get().getMessage("På besøg i fængslet");
		
	}

}
